<!--
 * @Author: your name
 * @Date: 2021-08-19 09:45:03
 * @LastEditTime: 2021-08-19 09:59:00
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \练习\10-donghua.html
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>动画</title>
    <style>
        .box{
        width:100px;
        height: 100px;
        background-color: aqua;
        border-radius: 50%;
    }
        /* 2设定动画 */
        .move{
            animation-name: move;
            animation-duration: 2s;
            animation-timing-function: linear;
            animation-fill-mode:forwards;   
            animation-iteration-count: 2; 
            animation-direction: alternate-reverse;
        }
        /* 1定义动画帧 */
        @keyframes move{
            form{
                margin-left: 0;
            }
            to{
                margin-left: 800px;
            }
        }
        .move:hover {
            animation-play-state: paused;
        }
        .move_delay_1 {
            animation-delay: 1s;
        }

    </style>
</head>
<body>
    <div class="box move"></div>
    <div class="box move move_delay_1"></div> 
</body>
</html>